package com.cwvs.cat.bean;

import java.util.List;

import org.json.JSONException;
import org.json.JSONObject;

import com.cwvs.cat.Applications;

public class ActiveTrends {
	public String id;
	public String sender;
	public String sendername;
	public String senderavatar;//20150410
	public String created;
	public String orderby;
	public String pic;
	public String content;
	public String status;
	public String goods_count;
	public String good_user="";
	public String comment_count;
	public String comments ;
	public boolean zan = false;
	public ActiveTrends(){

	}

	public ActiveTrends(List<String> list) throws JSONException{
		this.id = list.get(0);
		this.sender = list.get(1);
		this.sendername = list.get(2);
		this.senderavatar = list.get(3);
		this.created = list.get(4);
		this.orderby = list.get(5);
		this.pic = list.get(6);
		this.content = list.get(7);
		this.status = list.get(8);
		this.goods_count = list.get(9);
		this.good_user = list.get(10).toString();
		if (!good_user.equals("null")&&!good_user.equals("")) {
			JSONObject jsonObject = new JSONObject(list.get(10).toString());
			JSONObject jsonObject2 = jsonObject.getJSONObject("item");
			if (jsonObject2.has(Applications.user.id)) {
				zan = true;
			}else {
				zan = false;
			}
		}
		this.comment_count = list.get(11);
		this.comments = list.get(12);
	}
	
	
}
